{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 第八步：调整学习率，再次调节n_estimators\n",
    "调整学习率为0.05"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xgboost import XGBClassifier\n",
    "import xgboost as xgb\n",
    "\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "import math\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "\n",
    "from sklearn.metrics import log_loss\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# path to where the data lies\n",
    "dpath = './'\n",
    "train = pd.read_csv(dpath +\"RentListingInquries_FE_train.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = train['interest_level']\n",
    "X_train = np.array(train.drop([\"interest_level\"], axis=1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# prepare cross validation\n",
    "kfold = StratifiedKFold(n_splits=5, shuffle=True, random_state=3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 训练\n",
    "采用前几步调整的参数：max_depth = 5，min_child_weight = 4，subsample = 0.8， colsample_bytree = 0.7，reg_alpha = 1.5，reg_lambda = 0.5，\n",
    "调整learning_rate为0.05"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "def modelfit(alg, X_train, y_train, useTrainCV=True, cv_folds=None, early_stopping_rounds=100):\n",
    "    \n",
    "    if useTrainCV:\n",
    "        xgb_param = alg.get_xgb_params()\n",
    "        xgb_param['num_class'] = 3\n",
    "        \n",
    "        xgtrain = xgb.DMatrix(X_train, label = y_train)\n",
    "        \n",
    "        cvresult = xgb.cv(xgb_param, xgtrain, num_boost_round=alg.get_params()['n_estimators'], folds =cv_folds,\n",
    "                         metrics='mlogloss', early_stopping_rounds=early_stopping_rounds)\n",
    "        \n",
    "        n_estimators = cvresult.shape[0]\n",
    "        alg.set_params(n_estimators = n_estimators)\n",
    "        \n",
    "        print(cvresult)\n",
    "        #result = pd.DataFrame(cvresult)   #cv缺省返回结果为DataFrame\n",
    "        #result.to_csv('my_preds.csv', index_label = 'n_estimators')\n",
    "        cvresult.to_csv('5_nestimators.csv', index_label = 'n_estimators')\n",
    "        \n",
    "        # plot\n",
    "        test_means = cvresult['test-mlogloss-mean']\n",
    "        test_stds = cvresult['test-mlogloss-std'] \n",
    "        \n",
    "        train_means = cvresult['train-mlogloss-mean']\n",
    "        train_stds = cvresult['train-mlogloss-std'] \n",
    "\n",
    "        x_axis = range(0, n_estimators)\n",
    "        pyplot.errorbar(x_axis, test_means, yerr=test_stds ,label='Test')\n",
    "        pyplot.errorbar(x_axis, train_means, yerr=train_stds ,label='Train')\n",
    "        pyplot.title(\"XGBoost n_estimators vs Log Loss\")\n",
    "        pyplot.xlabel( 'n_estimators' )\n",
    "        pyplot.ylabel( 'Log Loss' )\n",
    "        pyplot.savefig( '5_nestimators.png' )\n",
    "    \n",
    "    #Fit the algorithm on the data\n",
    "    alg.fit(X_train, y_train, eval_metric='mlogloss')\n",
    "        \n",
    "    #Predict training set:\n",
    "    train_predprob = alg.predict_proba(X_train)\n",
    "    logloss = log_loss(y_train, train_predprob)\n",
    "\n",
    "        \n",
    "    #Print model report:\n",
    "    print(\"logloss of train :\" )\n",
    "    print(logloss)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "      train-mlogloss-mean  train-mlogloss-std  test-mlogloss-mean  \\\n",
      "0                1.069086            0.000086            1.069325   \n",
      "1                1.041801            0.000366            1.042256   \n",
      "2                1.016860            0.000488            1.017587   \n",
      "3                0.993878            0.000698            0.994755   \n",
      "4                0.972147            0.001022            0.973228   \n",
      "5                0.951898            0.000921            0.953229   \n",
      "6                0.933290            0.001143            0.934867   \n",
      "7                0.916238            0.001337            0.918015   \n",
      "8                0.899842            0.001222            0.901844   \n",
      "9                0.884740            0.001099            0.886923   \n",
      "10               0.870789            0.000853            0.873161   \n",
      "11               0.857307            0.000669            0.859872   \n",
      "12               0.844781            0.001023            0.847538   \n",
      "13               0.833110            0.001358            0.836036   \n",
      "14               0.821952            0.001430            0.825085   \n",
      "15               0.811539            0.001485            0.814810   \n",
      "16               0.801796            0.001552            0.805276   \n",
      "17               0.792430            0.001407            0.796103   \n",
      "18               0.783973            0.001369            0.787822   \n",
      "19               0.776014            0.001396            0.780060   \n",
      "20               0.768447            0.001448            0.772734   \n",
      "21               0.760962            0.001336            0.765459   \n",
      "22               0.753927            0.001195            0.758612   \n",
      "23               0.747331            0.001116            0.752212   \n",
      "24               0.741080            0.001033            0.746149   \n",
      "25               0.735400            0.001141            0.740626   \n",
      "26               0.729833            0.001213            0.735192   \n",
      "27               0.724509            0.001169            0.730121   \n",
      "28               0.719564            0.001190            0.725386   \n",
      "29               0.714896            0.001151            0.720912   \n",
      "...                   ...                 ...                 ...   \n",
      "978              0.450869            0.000854            0.579277   \n",
      "979              0.450764            0.000855            0.579263   \n",
      "980              0.450652            0.000848            0.579249   \n",
      "981              0.450545            0.000846            0.579250   \n",
      "982              0.450434            0.000846            0.579244   \n",
      "983              0.450335            0.000851            0.579240   \n",
      "984              0.450223            0.000846            0.579237   \n",
      "985              0.450124            0.000863            0.579236   \n",
      "986              0.450018            0.000883            0.579238   \n",
      "987              0.449919            0.000877            0.579248   \n",
      "988              0.449809            0.000875            0.579243   \n",
      "989              0.449703            0.000863            0.579234   \n",
      "990              0.449592            0.000865            0.579248   \n",
      "991              0.449491            0.000870            0.579233   \n",
      "992              0.449399            0.000884            0.579246   \n",
      "993              0.449287            0.000876            0.579240   \n",
      "994              0.449181            0.000868            0.579246   \n",
      "995              0.449063            0.000876            0.579247   \n",
      "996              0.448958            0.000888            0.579234   \n",
      "997              0.448855            0.000881            0.579233   \n",
      "998              0.448750            0.000888            0.579228   \n",
      "999              0.448640            0.000891            0.579239   \n",
      "1000             0.448533            0.000885            0.579245   \n",
      "1001             0.448426            0.000893            0.579247   \n",
      "1002             0.448327            0.000896            0.579227   \n",
      "1003             0.448224            0.000908            0.579216   \n",
      "1004             0.448133            0.000908            0.579214   \n",
      "1005             0.448025            0.000906            0.579218   \n",
      "1006             0.447928            0.000924            0.579219   \n",
      "1007             0.447820            0.000915            0.579209   \n",
      "\n",
      "      test-mlogloss-std  \n",
      "0              0.000127  \n",
      "1              0.000606  \n",
      "2              0.000724  \n",
      "3              0.000820  \n",
      "4              0.001227  \n",
      "5              0.001297  \n",
      "6              0.001541  \n",
      "7              0.001779  \n",
      "8              0.001756  \n",
      "9              0.001508  \n",
      "10             0.001308  \n",
      "11             0.001257  \n",
      "12             0.001484  \n",
      "13             0.001708  \n",
      "14             0.001786  \n",
      "15             0.001835  \n",
      "16             0.001966  \n",
      "17             0.001969  \n",
      "18             0.001865  \n",
      "19             0.001789  \n",
      "20             0.001617  \n",
      "21             0.001579  \n",
      "22             0.001384  \n",
      "23             0.001317  \n",
      "24             0.001339  \n",
      "25             0.001350  \n",
      "26             0.001397  \n",
      "27             0.001405  \n",
      "28             0.001359  \n",
      "29             0.001392  \n",
      "...                 ...  \n",
      "978            0.003915  \n",
      "979            0.003920  \n",
      "980            0.003921  \n",
      "981            0.003926  \n",
      "982            0.003930  \n",
      "983            0.003929  \n",
      "984            0.003925  \n",
      "985            0.003930  \n",
      "986            0.003933  \n",
      "987            0.003916  \n",
      "988            0.003915  \n",
      "989            0.003906  \n",
      "990            0.003901  \n",
      "991            0.003926  \n",
      "992            0.003931  \n",
      "993            0.003945  \n",
      "994            0.003930  \n",
      "995            0.003920  \n",
      "996            0.003922  \n",
      "997            0.003925  \n",
      "998            0.003939  \n",
      "999            0.003943  \n",
      "1000           0.003933  \n",
      "1001           0.003921  \n",
      "1002           0.003911  \n",
      "1003           0.003892  \n",
      "1004           0.003885  \n",
      "1005           0.003891  \n",
      "1006           0.003873  \n",
      "1007           0.003862  \n",
      "\n",
      "[1008 rows x 4 columns]\n",
      "logloss of train :\n",
      "0.46623535741773686\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEXCAYAAABCjVgAAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4wLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvqOYd8AAAIABJREFUeJzt3XmYXGWZ/vHv03unO3s6ZCcBEkhENsMmglFAIWIARRbFEVEZZoYfuA8ojoqCyriwjsowwCAKg+wCgsquIiRhCSQhELKQhIQkZE+6k16e3x/vW90nne50ddLVp7rr/lzXubrOUuc8p05Sd533bObuiIiIABSlXYCIiOQPhYKIiDRTKIiISDOFgoiINFMoiIhIM4WCiIg0UyiIJJjZt8zsxrTrEEmLQqGHMbNqM1tkZp9JDOtrZm+Z2WmJYZPN7EEzW2tm68xsjpldbmYD4/hzzKzRzDbFboGZ/UuOa59iZktzuYzOaKsed7/C3b+Yo+UtMrPjcjHvXOiu7dXTPpfeTqHQw7j7JuCfgavMrCYOvhKY4e53AZjZ+4Engb8B+7n7AOAEoAE4MDG7Z9292t2rgU8CV5rZwd2zJtIZZlaSdg1SINxdXQ/sgFuA24EpwLvAsMS4vwLXdvD+c4C/thr2PPDpRP80YDawjhAyExPjJsZh6+I00xLjpgJzgI3AMuDrQBVQCzQBm2I3op31uh54KL7/OWDvLD6P/YA/A2uAecDpu1IP8D3gtvi+sYADnweWAGuB84FDgVlx3a9LLGdv4PG4PVYDvwUGxHG/icuqjcv6Zhaf8SLg3+OytgIlsX9ZXJd5wLFtfBaHAyuA4sSwU4F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4fhKeejQY2An13Y5H9CA/IWW9mexCeu5uRnPfzwAfNbEh8tvhZwFOtZxb3dPq7+8PAVwjPbhbZbdpTkEL2GeCXZnYpUEo4LvAy8J9mNp5wjOCxOOwt4OLY1PSjzi7I3V82sxcJt4ReQmiiyrgBeMTM3nb3D8VTXZ+Iy3/I3e/fcY70Be43s4o43Vc7W5NIW3RKqoiINFPzkYiINFPzkfR6ZnY94Tm/SVe7+81p1COSz9R8JCIizdR8JCIizRQKIiLSTKEgIiLNFAoiItLs/wNSo8607T/2DwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "xgb5_1 = XGBClassifier(\n",
    "        learning_rate =0.05,\n",
    "        n_estimators=2000,  #第二轮参数调整得到的n_estimators最优值\n",
    "        max_depth=5,\n",
    "        min_child_weight=4,\n",
    "        gamma=0,\n",
    "        subsample=0.8,\n",
    "        colsample_bytree=0.6,\n",
    "        colsample_bylevel = 0.7,\n",
    "        objective= 'multi:softprob',\n",
    "        reg_alpha = 1.5,\n",
    "        reg_lambda = 0.5,    \n",
    "        seed=3)\n",
    "\n",
    "\n",
    "modelfit(xgb5_1, X_train, y_train, cv_folds = kfold)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "n_estimators is :  1008\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/zhangwt/.local/lib/python3.6/site-packages/ipykernel_launcher.py:2: FutureWarning: from_csv is deprecated. Please use read_csv(...) instead. Note that some of the default arguments are different, so please refer to the documentation for from_csv when changing your function calls\n",
      "  \n"
     ]
    }
   ],
   "source": [
    "# n_estimators\n",
    "cvresult = pd.DataFrame.from_csv('5_nestimators.csv')\n",
    "#cvresult.shape\n",
    "#cvresult.head\n",
    "print(\"n_estimators is : \", cvresult.shape[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train-mlogloss-mean is : 0.44781980000000005\n",
      "test-mlogloss-mean is : 0.5792092\n"
     ]
    }
   ],
   "source": [
    "# train-mlogloss-mean\n",
    "print(\"train-mlogloss-mean is :\", cvresult['train-mlogloss-mean'][1007])\n",
    "print(\"test-mlogloss-mean is :\", cvresult['test-mlogloss-mean'][1007])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 保存模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "xgb5_1.save_model('RentListingInqueries')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 最终参数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最终参数：\n",
      "learning_rate:  0.05\n",
      "n_estimators:  1008\n",
      "max_depth:  5\n",
      "min_child_weight:  4\n",
      "subsample:  0.8\n",
      "colsample_bytree:  0.6\n",
      "reg_alpha:  1.5\n",
      "reg_lambda:  0.5\n"
     ]
    }
   ],
   "source": [
    "print(\"最终参数：\")\n",
    "print('learning_rate: ', 0.05)\n",
    "print('n_estimators: ', 1008)\n",
    "print('max_depth: ', 5)\n",
    "print('min_child_weight: ', 4)\n",
    "print('subsample: ', 0.8)\n",
    "print('colsample_bytree: ', 0.6)\n",
    "print('reg_alpha: ', 1.5)\n",
    "print('reg_lambda: ', 0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
